
#import "DataType.h"

@interface Spell : CCNode
{
	CCSprite*		mIcon;
	bool			mTrans;			// 是否需要透明
	bool			mCasted;		// 是否已经发动
	SpellType		mType;			// 类型
	SpellData*		mInfo;
}

@property (nonatomic,readonly)SpellType sType;
@property (nonatomic,readonly)int sell;
@property (nonatomic,readonly)float duration;
@property (nonatomic,readonly)NSString* spellName;
@property (nonatomic,readonly)NSString* desc;
@property (nonatomic,readonly)NSString* fileName;

-(id)initWithType:(SpellType)type trans:(bool)trans;
-(bool)checkClick:(UITouch*)touch;
-(void)change:(SpellType)type;
-(void)cast;
-(void)castFinish;
-(NSString*)durationStr;

@end

@interface SpellSlot : CCNode
{
	Spell* mSpells[SPELLSLOT_COUNT];
}

-(Spell*)spell:(int)idx;
-(int)checkClick:(UITouch*)touch;
-(void)cast:(int)idx;
-(void)changeSpell:(int)idx type:(SpellType)type;
-(CGPoint)spellPos:(int)idx;

@end
